
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Easily
{
    ///==============================================================================
    /// <summary>
    /// 功能概要：本类保存控件生成的代码
    /// 使用说明：全局变量命名原则：'g'+驱动名(大写)+'_'+含义名(小写)。如：gGPIO_get
    /// </summary>
    ///==============================================================================
    public class Code
    {
        /// <summary>全局变量</summary>
        public string GlobalVariable = "";
        /// <summary>局部变量</summary>
        public string LocalVariable = "";
        /// <summary>变量初值</summary>
        public string    InitVariable = "";
        /// <summary>中断服务例程</summary>
        public string InterruptServiceStart = "";
        public string InterruptServiceEnd = "";
        /// <summary>中断服务声明</summary>
        public string InterruptDeclare = "";
        /// <summary>初始化代码</summary>
        public string    Initialization   = "";
        /// <summary>插入控件位置处的代码</summary>
        public string    InsertCode       = "";
        /// <summary>中断使能代码</summary>
        public string    InterruptEnable  = "";
        /// <summary>子函数代码</summary>
        public string SubfunctionStart = "";
        public string SubfunctionEnd = "";
        /// <summary>子函数代码声明</summary>
        public string SubfunctionDeclare = "";
        /// <summary>头文件</summary>
        public string    HeadFile         = "";	
        /// <summary>宏常数</summary>
        public string    MacroConstant    = "";
        /// <summary>结构体类型</summary>
        public string    CustomDataType   = ""; 
        /// <summary>整个控件的注释，鼠标放置之后显示</summary>
        public string    Comment          = "";
        /// <summary>保存控件的参数信息，用于恢复控件</summary>
        public string    Save             = "";
        public void Clear()
        {
            GlobalVariable = "";
            /// <summary>局部变量</summary>
            LocalVariable = "";
            /// <summary>变量初值</summary>
            InitVariable = "";
            /// <summary>中断服务例程</summary>
            InterruptServiceStart = "";
            InterruptServiceEnd = "";
            /// <summary>中断服务声明</summary>
            InterruptDeclare = "";
            /// <summary>初始化代码</summary>
            Initialization = "";
            /// <summary>插入控件位置处的代码</summary>
            InsertCode = "";
            /// <summary>中断使能代码</summary>
            InterruptEnable = "";
            /// <summary>子函数代码</summary>
            SubfunctionStart = "";
            SubfunctionEnd = "";
            /// <summary>子函数代码声明</summary>
            SubfunctionDeclare = "";
            /// <summary>头文件</summary>
            HeadFile = "";
            /// <summary>宏常数</summary>
            MacroConstant = "";
            /// <summary>结构体类型</summary>
            CustomDataType = "";
            /// <summary>整个控件的注释，鼠标放置之后显示</summary>
            Comment = "";
            /// <summary>保存控件的参数信息，用于恢复控件</summary>
            Save = "";
    }
    }

}
